Add TAL-Reverb-II plugin to test
[juce-lv2.git] / juce / source / extras / audio plugin host / Source / MainHostWindow.h
blob59e2b6d36606ab0c04fd4361a428d94b8e936c95
1 /*
2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-9 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCE_MAINHOSTWINDOW_JUCEHEADER__
27 #define __JUCE_MAINHOSTWINDOW_JUCEHEADER__
29 #include "FilterGraph.h"
30 #include "GraphEditorPanel.h"
33 //==============================================================================
34 namespace CommandIDs
36 static const int open = 0x30000;
37 static const int save = 0x30001;
38 static const int saveAs = 0x30002;
39 static const int showPluginListEditor = 0x30100;
40 static const int showAudioSettings = 0x30200;
41 static const int aboutBox = 0x30300;
44 extern ApplicationCommandManager* commandManager;
47 //==============================================================================
48 /**
50 class MainHostWindow : public DocumentWindow,
51 public MenuBarModel,
52 public ApplicationCommandTarget,
53 public ChangeListener,
54 public FileDragAndDropTarget
56 public:
57 //==============================================================================
58 MainHostWindow();
59 ~MainHostWindow();
61 //==============================================================================
62 void closeButtonPressed();
63 void changeListenerCallback (ChangeBroadcaster*);
65 bool isInterestedInFileDrag (const StringArray& files);
66 void fileDragEnter (const StringArray& files, int, int);
67 void fileDragMove (const StringArray& files, int, int);
68 void fileDragExit (const StringArray& files);
69 void filesDropped (const StringArray& files, int, int);
71 const StringArray getMenuBarNames();
72 const PopupMenu getMenuForIndex (int topLevelMenuIndex, const String& menuName);
73 void menuItemSelected (int menuItemID, int topLevelMenuIndex);
74 ApplicationCommandTarget* getNextCommandTarget();
75 void getAllCommands (Array <CommandID>& commands);
76 void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result);
77 bool perform (const InvocationInfo& info);
79 bool tryToQuitApplication();
81 void createPlugin (const PluginDescription* desc, int x, int y);
83 void addPluginsToMenu (PopupMenu& m) const;
84 const PluginDescription* getChosenType (const int menuID) const;
86 GraphDocumentComponent* getGraphEditor() const;
88 private:
89 //==============================================================================
90 AudioDeviceManager deviceManager;
92 OwnedArray <PluginDescription> internalTypes;
93 KnownPluginList knownPluginList;
94 KnownPluginList::SortMethod pluginSortMethod;
96 void showAudioSettings();
98 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainHostWindow);
102 #endif